package com.hsc.yalebao.adapter;

import android.content.Context;
import android.content.res.Resources;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import com.hsc.yalebao.model.GetchildUserListBeanModel;
import com.hsc.yalebao.tools.UiUtil;
import java.util.ArrayList;

public class GetchildUserListAdapter extends BaseAdapter
{
  String TAG = "GetAgentUserListtAdapter";
  private Context context;
  int count = 1;
  ViewHolder holder = null;
  private LayoutInflater inflater;
  private ArrayList<GetchildUserListBeanModel> list;

  public GetchildUserListAdapter(Context paramContext, ArrayList<GetchildUserListBeanModel> paramArrayList)
  {
    this.context = paramContext;
    this.inflater = LayoutInflater.from(paramContext);
    this.list = paramArrayList;
  }

  public int getCount()
  {
    if (this.list == null)
      return 0;
    return this.list.size();
  }

  public Object getItem(int paramInt)
  {
    return this.list.get(paramInt);
  }

  public long getItemId(int paramInt)
  {
    return paramInt;
  }

  public View getView(int paramInt, View paramView, ViewGroup paramViewGroup)
  {
    if (paramView == null)
    {
      this.holder = new ViewHolder();
      paramView = this.inflater.inflate(2130903141, null);
      this.holder.tv_real_name = ((TextView)paramView.findViewById(2131100147));
      this.holder.tv_nick_name = ((TextView)paramView.findViewById(2131100148));
      this.holder.tv_kuisun = ((TextView)paramView.findViewById(2131100149));
      paramView.setTag(this.holder);
    }
    GetchildUserListBeanModel localGetchildUserListBeanModel;
    while (true)
    {
      localGetchildUserListBeanModel = (GetchildUserListBeanModel)this.list.get(paramInt);
      if (localGetchildUserListBeanModel != null)
        break;
      return paramView;
      this.holder = ((ViewHolder)paramView.getTag());
    }
    Double localDouble;
    String str;
    try
    {
      this.holder.tv_real_name.setText(localGetchildUserListBeanModel.getUser_name());
      this.holder.tv_nick_name.setText("昵称 ：" + localGetchildUserListBeanModel.getNick_name());
      localDouble = Double.valueOf(Double.parseDouble(localGetchildUserListBeanModel.getLossmoney()));
      str = UiUtil.savePoint(localDouble.doubleValue(), 2);
      if (localDouble.doubleValue() > 0.0D)
      {
        this.holder.tv_kuisun.setText("+" + str);
        this.holder.tv_kuisun.setTextColor(this.context.getResources().getColor(2131165214));
        return paramView;
      }
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
      return paramView;
    }
    if (localDouble.doubleValue() < 0.0D)
    {
      this.holder.tv_kuisun.setText(str);
      this.holder.tv_kuisun.setTextColor(this.context.getResources().getColor(2131165321));
      return paramView;
    }
    this.holder.tv_kuisun.setText(str);
    this.holder.tv_kuisun.setTextColor(this.context.getResources().getColor(2131165335));
    return paramView;
  }

  public void setData(ArrayList<GetchildUserListBeanModel> paramArrayList)
  {
    this.list = paramArrayList;
  }

  public class ViewHolder
  {
    private TextView tv_kuisun;
    private TextView tv_nick_name;
    private TextView tv_real_name;

    public ViewHolder()
    {
    }
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.hsc.yalebao.adapter.GetchildUserListAdapter
 * JD-Core Version:    0.6.2
 */